#include "../include/FireworkCone.h"

#include <algorithm>
#include <iterator>

#include "../include/utilities.h"

void FireworkCone::initFireworkParticles() {
	std::uniform_int_distribution<> lengthDis(1, 3);
	std::uniform_real_distribution<float> speedDis(20, 40);
	std::uniform_real_distribution<float> heightDis(50, 70);
	
	Vector3 normal = getRandomNormal(60, 90, 0, 360);
	float height = heightDis(m_gen);
	Vector3 vertexPos = Vector3Add(m_pos, Vector3Scale(normal, height));
	std::vector<Vector3> conePointList = getNormalConePos(m_pos, vertexPos, height);
	float initSpeed = speedDis(m_gen);
	std::vector<Vector3> speedList = getSpeedlistFromPoslist(m_pos, initSpeed, conePointList);
	Color color = getRandomColor();
	addNewBombs(m_pos, speedList, color, lengthDis(m_gen));
}

